package com.ws.soa.consumer.payment.constant;

import org.apache.commons.lang3.StringUtils;

public enum MchPropertiesEnum {

    GOOD_DEEPS_MCH("1527750911", "FASWC2BD2T0VPSS76IDO13SAOTCINDFC");


    /**
     * 商户号id
     */
    private String mchId;
    /**
     * 商户号key
     */
    private String mchKey;

    MchPropertiesEnum(String mchId, String mchKey) {
        this.mchId = mchId;
        this.mchKey = mchKey;
    }

    public String getMchId() {
        return mchId;
    }

    public String getMchKey() {
        return mchKey;
    }

    public static MchPropertiesEnum getWcPropertiesEnum(String mchId) {
        if (StringUtils.isBlank(mchId)) {
            return null;
        }
        for (MchPropertiesEnum mchPropertiesEnum : MchPropertiesEnum.values()) {
            if (StringUtils.equals(mchId, mchPropertiesEnum.getMchId())) {
                return mchPropertiesEnum;
            }
        }
        return null;
    }
}
